package com.yc.yyds.biz;

import com.yc.yyds.dao.QueryMoviesShowListDao;
import com.yc.yyds.util.DBHelper;

import java.util.List;
import java.util.Map;

public class QueryShowListBiz {
    QueryMoviesShowListDao dao = new QueryMoviesShowListDao();
    public List<Map<String,Object>> QueryShowListMovies(String id, String starttime) throws BizException {
        if (!starttime.matches("\\d{1,2}-\\d{1,2}")){
            throw new BizException("由于未知原因查询失败，请联系管理员");
        }
        return dao.queryCinemaMovies(id,starttime);
    }
    public List<Map<String,Object>> QueryArrangeMovies() throws BizException {
        try {
            return dao.queryArrangeMovies();
        }catch (Exception e){
            e.printStackTrace();
            throw  new BizException("由于未知原因查询失败，请联系管理员");
        }
    }
}
